package dbOperation;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * Created by v on 17-5-20.
 */
public class TestSelect {
    public static void main(String[] args) {

        try {
            String sql="SELECT * FROM library;";
            Statement st=DbConnection.getStatment();
            ResultSet set=st.executeQuery(sql);

            while (set.next()){
                System.out.println(set.getString(2));
            }
        }catch (SQLException ex){
            ex.printStackTrace();
        }
    }
}
